import Vue from 'vue'
export default {
  state: {
    //用户信息
    user:{},

    //用户购物车
    cart:{},

    orders:[]
  },

  mutations:{
    setUser (state,user) {
      state.user = user;
    },

    setCart (state,cart){
      Vue.set(state,'cart',cart)
    },

    setOrders(state,orders){
      Vue.set(state,'orders',orders)
    }
  }
}
